package model.market;

public class OscillatingRiskFreeRateProvider implements RateProvider {

	@Override
	public double getRate(double currentRiskFree , int period, MarketInformation info) {

		if (info.getConfig().newDawn(period)) {
			if (period % 40 > 19) {
				currentRiskFree = (currentRiskFree - .0015);
			} else {
				currentRiskFree = (currentRiskFree + .0015);
			}
		} 
		return currentRiskFree;
	}

}
